package com.qqtech.qquan.homemaking.model;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

@SuppressWarnings("serial")
public class HomemakingSysDictVo extends HomemakingSysDict{
	
	/**
	 * 家政服务详情的 服务标准，服务流程
	 */
	private List<String> nameList;
	
	/**
	 * 家政服务详情的 服务流程图片
	 */
	private List<String> imgList;
	
	public List<String> getNameList() {
		if (this.getName() != null) {
			String[] temp = this.getName().split("\\r|\\s|;");
			List<String> tempList = new ArrayList<String>();
			for (int i = 0; i < temp.length; i++) {
				if (StringUtils.isNotBlank(temp[i])) {
					tempList.add(temp[i]);
				}
			}
			if (!tempList.isEmpty()) {
				return tempList;
			}
		}
		return null;
	}

	public void setNameList(List<String> nameList) {
		this.nameList = nameList;
	}

	public List<String> getImgList() {
		if (this.getRemark() != null) {
			String[] temp = this.getRemark().split("\\r|\\s|;");
			List<String> tempList = new ArrayList<String>();
			for (int i = 0; i < temp.length; i++) {
				if (StringUtils.isNotBlank(temp[i])) {
					tempList.add(temp[i]);
				}
			}
			if (!tempList.isEmpty()) {
				return tempList;
			}
		}
		return null;
	}

	public void setImgList(List<String> imgList) {
		this.imgList = imgList;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}
}